# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=shotwell
pkgver=0.30.10
pkgrel=1
pkgdesc="A digital photo organizer designed for the GNOME desktop environment"
url="https://wiki.gnome.org/Apps/Shotwell"
arch="all !s390x !mips !mips64" # librsvg
license="CC-BY-SA-3.0 AND LGPL-2.1-or-later"
subpackages="$pkgname-lang $pkgname-doc"
makedepends="vala libgee-dev libunique3-dev webkit2gtk-dev libexif-dev
	sqlite-dev libgudev-dev dbus-glib-dev libgphoto2-dev gexiv2-dev libraw-dev
	librsvg-dev json-glib-dev gst-plugins-base-dev gtk+3.0-dev rest-dev
	gcr-dev itstool libgdata-dev meson"
checkdepends="desktop-file-utils appstream-glib"
source="https://download.gnome.org/sources/shotwell/${pkgver%.*}/shotwell-$pkgver.tar.xz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dinstall-apport-hook=false \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="4c84b5702476f264bd475fa93eff2e58f2876b076f186fc19b3dbddaae76b80485793b887f668788ac3c7f7230eb0c6a61fef2c0c70d52c665d0e49f6deb0b11  shotwell-0.30.10.tar.xz"
